import { post, get, put, del } from "@/utils/NetworkRequest/index";
import { objToQueryString } from "@/utils/Tools/Toquery";
//数据列表
export const dataListApi = (page=1,query={},size=10)=>{
    if('page'in query){
        delete query.page
      }
      query = objToQueryString(query)
    return get<DataModule.DataList>(`/api/information/salestrend?page=${page}&saze=${size}`)
}
//销售趋势
//天数据
export const dayDataApi = ()=>{ 
  return get<any>(`/api/information/salestrend/day`)
}
//周数据
export const weekDataApi = ()=>{ 
  return get<any>(`/api/information/salestrend/week`)
}
//月数据
export const mouthDataApi = ()=>{ 
  return get<any>(`/api/information/salestrend/mouth`)
}

//销售排行
//天数据
export const dayrankDataApi = ()=>{ 
  return get<any>(`/api/information/salesranking/day`)
}
//周数据
export const weekrankDataApi = ()=>{ 
  return get<any>(`/api/information/salesranking/week`)
}
//月数据
export const monthrankDataApi = ()=>{ 
  return get<any>(`/api/information/salestrend/month`)
}
//销售数据
export const SaledataListApi = (page=1,query={},size=10)=>{
  if('page'in query){
      delete query.page
    }
    query = objToQueryString(query)
  return get<any>(`/api/information/salesranking/rank?page=${page}&size=${size}`)
}



//部门业绩数据
//请求全部数据
export const PartcustomerDataApi = (page=1,query={},size=10)=>{ 
  if('page'in query){
    delete query.page
  }
  query = objToQueryString(query)
  return get<any>(`/api/information/departmentperf/data?page=${page}&size=${size}`)
  

}